<table cellspacing="1" cellpadding="3" style="background: #fff;width:100%">
<tr>
    <td class="aslefttd">&nbsp;</td>
    <td><label class="tlable"><input type="radio" name="tf" value="1" <?php 
    if ($ans ){
        if ($ans['res']=='1'){
            echo ' checked="checked "';
        }
    }?>> <input type="text" id="t" <?php 
    if ($ans ){        
        echo ' value="'.$ans['answer']['t_txt'].'"';        
    }else {
        echo ' value="right" ';
    }?> /></label></td>			    
</tr>
<tr>
    <td>&nbsp;</td>
    <td><label class="tlable"><input type="radio" name="tf" value="0" <?php 
    if ($ans ){
        if ($ans['res']=='0'){
            echo ' checked="checked "';
        }
    }?>> <input type="text" id="f" <?php 
    if ($ans ){        
        echo ' value="'.$ans['answer']['f_txt'].'"';        
    }else {
        echo ' value="false" ';
    }?>/></label></td>			    
</tr>
</table>
<script>
function getAnswer()
{
	var res = getNameVal("tf");
    if(!res) return false;
	var t_txt=$.trim($("#t").val());
	var f_txt=$.trim($("#f").val());
    var tmpobj = {"res":res,"answer":{"t_txt":t_txt,"f_txt":f_txt}};
    return $.toJSON(tmpobj);
}
</script>